#pragma once
#include "resource.h"

/**
 * Klasa obrazu.
 *
 * @author Krzysztof Klein
 * @version 0.1
 */
class Image : public Resource
{
	LPDIRECT3DSURFACE9 surface;
	int width, height;

public:

	Image() : Resource(), surface(NULL), width(0), height(0) { }
	~Image() { if(surface) surface->Release(); }

	LPDIRECT3DSURFACE9 getSurface() const { return surface; }

	int getWidth() const { return width; }
	int getHeight() const { return height; }

private:

	/**
	 * Typ zasobu
	 */
	Type getType() const { return Resource::ImageResource; }

	/**
	 * Laduje zasob.
	 */
	virtual bool load();
	/**
	 * ...
	 */
	virtual void unload();
};